package com.wuzhishan.news.controller;

import com.wuzhishan.news.service.otherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class otherController {
    @Autowired
    private otherService otherService;

    @RequestMapping("/other/{userId}")
    public Object other(@PathVariable Integer userId, @RequestParam(defaultValue = "1") Integer page){
        //默认设置PageSize为5
        System.out.println(page);
        ModelAndView mv = new ModelAndView("other/index");
        mv = otherService.otherIndex(userId,mv,page);
        return mv;
    }
}
